package com.ruoyi.business.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.business.mapper.DegreesMapper;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.domain.bo.HisDormitoryBo;
import com.ruoyi.business.domain.vo.HisDormitoryVo;
import com.ruoyi.business.domain.HisDormitory;
import com.ruoyi.business.mapper.HisDormitoryMapper;
import com.ruoyi.business.service.IHisDormitoryService;

import java.util.List;
import java.util.Map;
import java.util.Collection;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
 * 退宿舍Service业务层处理
 *
 * @author songzhengsheng
 * @date 2023-06-29
 */
@RequiredArgsConstructor
@Service
public class HisDormitoryServiceImpl  extends ServiceImpl<HisDormitoryMapper, HisDormitory> implements IHisDormitoryService {
    @Autowired
    private HisDormitoryMapper hisDormitoryMapper;

    @Override
    public LambdaQueryWrapper<HisDormitory> buildQueryWrapper(HisDormitory bo) {
        LambdaQueryWrapper<HisDormitory> lqw = Wrappers.lambdaQuery();
                    lqw.eq(bo.getDormitoryid() != null, HisDormitory::getDormitoryid, bo.getDormitoryid());
                    lqw.eq(StringUtils.isNotBlank(bo.getPicurl()), HisDormitory::getPicurl, bo.getPicurl());
                    lqw.eq(StringUtils.isNotBlank(bo.getEmployeeids()), HisDormitory::getEmployeeids, bo.getEmployeeids());
        return lqw;
    }

    @Override
    public List<HisDormitory> getList(HisDormitory entity) {
        return hisDormitoryMapper.getList(entity);
    }

}
